<?php

function downfiles($field, $value) {
    extract(unserialize($this->fields[$field]['setting']));
    $list_str = array();
    $file_list = unserialize($value);
    
    if (is_array($file_list)) {
        foreach ($file_list as $_k => $_v) {
            if ($_v['fileurl']) {
                $filename = $_v['filename'] ? $_v['filename'] : "点击下载";
                $list_str[] = "<a href='{$_v['fileurl']}' target='_blank' class='btn-download'>{$filename}</a>";
            }
        }
    }
    return $list_str;
}

?>